<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="dao.*" %>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="TagGroup" prefix="mytag"%>
<!doctype html>
<html lang="zh-CN">
<style>
  .button1 {

            -webkit-transition-duration: 0.4s;
            transition-duration: 0.4s;
            padding: 12px 24px;
            text-align: center;
            background-color: white;
            border: 2px solid #4CAF50;
            border-radius:5px;
            position: relative;
            
        }
        .button2 {
            padding: 10px 20px;
            text-align: center;
            background-color: white;
            border: 2px solid #4CAF50;
            border-radius:5px;
            position: relative;
            
        }
        .button1:hover {
            background-color: #4CAF50;
        }
.excerptqzk{clear:both;border:1px solid #EAEAEA;padding:10px 10px 10px 10px;overflow:hidden;background-color:#fff;margin-bottom:-1px;}
</style>
<head >
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人主页</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/nprogress.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="apple-touch-icon-precomposed" href="images/icon.png">
<link rel="shortcut icon" href="images/favicon.ico">
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/nprogress.js"></script>
<script src="js/jquery.lazyload.min.js"></script>
<script>
function rec()
{	  
	   alert("删除成功!");
}</script>
</head>
<body class="user-select">
 <mytag:userPageHeaderTag/> 
	<body>
		<div class="excerpt-minic excerpt-minic-index" style="text-align:center;width:70%;height:100px; margin:0 auto 20px auto">
					<a href="MymessageServlet?"><button type="button" class = "button1">我的留言</button></a> 
					 <a href="TamessageServlet?"><button type="button" class = "button1">他人留言</button></a>
			<!-- 如果session 有用户的id，用上面那段就ok-->	
		</div> 
		
		<div class="excerpt-minic excerpt-minic-index" style="width:70%;height:auto; margin:0 auto 20px auto">
			<div class="content-box-large">
  				<div class="panel-body" style="margin:0 0 0 0">
					<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
						<thead>
							<tr>
								<th>留言人</th>
								<th>留言列表</th>
								<th>操作</th>
							</tr>
						</thead>
						<!-- ÁÐ±íµÄÊä³ö -->
						<tbody>
                            <c:forEach var="message" items="${messages}" varStatus="status">
                            		<tr><td>${LeaveMessageDAO.getInstance().getName(message.send_id)}</td>
                            			<td>
		                                   ${message.context}
                                         </td>
                                         <td>
                                        <a href="MessageDeleteServlet?ID=${message.ID}&type=1" class="btn btn-danger" onClick = "rec()">删除</a>     	
                                         </td>
                                      </tr>
                                      
                            </c:forEach>

						</tbody>
					</table>
  				</div>
  			</div> 
		</div> 
		
	</body>



<footer class="footer">
<div class="container">
<p>Copyright &copy; 企业论坛  Powered by YNWA team!</p>
</div>
<div id="gotop"><a class="gotop"></a></div>
</footer>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.ias.js"></script>
<script src="js/scripts.js"></script>
<script src="https://code.jquery.com/jquery.js"></script>
<!-- jQuery UI -->
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="bootstrap/js/bootstrap.min.js"></script>

<script src="vendors/datatables/js/jquery.dataTables.min.js"></script>

<script src="vendors/datatables/dataTables.bootstrap.js"></script>

<script src="js/custom.js"></script>
<script src="js/tables.js"></script>
 	<script type="text/javascript">
    function delcfm() {
        if (!confirm("确定要删除该帖子吗？")) {
            window.event.returnValue = false;
        }
    }
	</script>
</body>
</html>
